#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
void Print(int* arr,int sz)
{

	int i = 0;
	for (i = 0; i < sz; i++)
	{
		printf("%d ", *(arr+i));
	}
}
void bubble_sort(int *arr, int sz)
{
	int i = 0;
	for (i = 0; i < sz - 1; i++)
	{
		int j = 0;
		for (j = 0; j < sz - i - 1; j++)
		{
			int tmp = 0;

			if (*(arr+j) > *(arr + j+1))
			{
				tmp = *(arr+j);
				*(arr+j) = *(arr + j+1);
				*(arr + j+1) = tmp;
			}
		}
	}
}
int main()
{
	int arr[] = { 5,4,3,2 ,13,141,15,16,14,141,515,16,14,14,156,1,16,15,16,16,16,16};
	int sz = sizeof(arr) / sizeof(arr[0]);
	bubble_sort(arr, sz);
	Print(arr,sz);
	return 0;
}